<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>元素隐藏与显示</title>
    <style>
        div{
            width: 200px;
            height: 100px;
            background-color: red;
            /*display: inline;*/
            display: inline-block;
        }
        span{
            width: 200px;
            height: 100px;
            background-color: red;
            display: block;
        }
    </style>
</head>
<body>
<h2>水果</h2>
<ul style="display: block">
    <li>苹果</li>
    <li>香蕉</li>
    <li>橘子</li>
    <li>西瓜</li>
</ul>
<h2>电子产品</h2>
<ul style="display: none">
    <li>手机</li>
    <li>手表</li>
    <li>平板</li>
</ul>
<h2>家用电器</h2>
<ul style="display: none">
    <li>电视</li>
    <li>冰箱</li>
    <li>空调</li>
</ul>
<hr>
<div>第1个div</div>
<div>第2个div</div>
<div>第3个div</div>
<hr>
<span>第1个span</span>
<span>第2个span</span>
<span>第3个span</span>
</body>
</html>